package br.com.criativasystem.server;

import java.io.IOException;
import java.net.ServerSocket;
import java.net.Socket;
import java.util.logging.Level;
import java.util.logging.Logger;

/**
 *
 * @author
 * Lucas
 * Calixto
 */
public class Server {

    public static void main(String[] args) {
        ServerSocket servidor = null;
        try {
            servidor = new ServerSocket(5300);

            while (true) {
                Socket socket = servidor.accept();
                new ThreadServer(socket).start();
            }
        } catch (IOException ex) {
            System.out.println("Erro no socket servidor");
        } finally {
            try {
                servidor.close();
            } catch (IOException ex) {
                Logger.getLogger(Server.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
    }
}
